]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: remove overview special handling
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 20:34:33 +0000 (15:34 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 17 Feb 2013 18:12:54 +0000 (13:12 -0500)
Don't show the message tray in the overview by default. From now on the
message tray in overview behaves as regularly, i.e. it will slide up the
overview on Super+M keypress.

https://bugzilla.gnome.org/show_bug.cgi?id=693987

data/theme/gnome-shell.css
js/ui/messageTray.js

index 8fca629fdfd3d390464a28d71f046d02f491703f..d32e405e947a5f53fd70b2f5c9db0789d2cfab66 100644 (file)
@@ -1310,11 +1310,6 @@ StScrollBar StButton#vhandle:active {
     height: 72px;
 }
 
-#message-tray:overview {
-    background: rgba(0, 0, 0, 0.1);
-    outline: 1px solid rgba(128, 128, 128, 0.3);
-}
-
 .message-tray-summary {
     height: 72px;
 }
index f87848110e766778cc6713c5bd128bd6c1d8c321..1e2c0784a4d862cc4b61168e015e31f065ad1b5e 100644 (file)
@@ -1680,7 +1680,7 @@ const MessageTray = new Lang.Class({
         this._desktopClone = null;
         this._inCtrlAltTab = false;
 
-        this._lightbox = new Lightbox.Lightbox(global.window_group,
+        this._lightbox = new Lightbox.Lightbox(global.overlay_group,
                                                { inhibitEvents: true,
                                                  fadeInTime: ANIMATION_TIME,
                                                  fadeOutTime: ANIMATION_TIME,
@@ -1699,13 +1699,11 @@ const MessageTray = new Lang.Class({
             function() {
                 this._overviewVisible = true;
                 this._grabHelper.ungrab(); // drop modal grab if necessary
-                this.actor.add_style_pseudo_class('overview');
                 this._updateState();
             }));
         Main.overview.connect('hiding', Lang.bind(this,
             function() {
                 this._overviewVisible = false;
-                this._escapeTray();
                 this._updateState();
             }));
 
@@ -2271,16 +2269,15 @@ const MessageTray = new Lang.Class({
         }
 
         // Summary
-        let summarySummoned = this._pointerInSummary || this._overviewVisible ||  this._traySummoned;
+        let summarySummoned = this._pointerInSummary || this._traySummoned;
         let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
         let summaryHovered = this._pointerInTray || this._pointerInSummary;
 
         let notificationsVisible = this._notificationState != State.HIDDEN;
         let notificationsDone = !notificationsVisible && !notificationsPending;
 
-        let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered;
-        let mustHideSummary = (notificationsPending && (notificationUrgent || summaryOptionalInOverview))
-                              || notificationsVisible || !Main.sessionMode.hasNotifications;
+        let mustHideSummary = ((notificationsPending && notificationUrgent)
+                              || notificationsVisible || !Main.sessionMode.hasNotifications);
 
         if (this._summaryState == State.HIDDEN && !mustHideSummary && summarySummoned)
             this._showSummary();
@@ -2327,8 +2324,7 @@ const MessageTray = new Lang.Class({
         // Desktop clone
         let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING ||
                                      this._desktopCloneState == State.SHOWN);
-        let desktopCloneShouldBeVisible = (trayShouldBeVisible &&
-                                           !this._overviewVisible);
+        let desktopCloneShouldBeVisible = (trayShouldBeVisible);
 
         if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
             this._showDesktopClone();
@@ -2362,13 +2358,8 @@ const MessageTray = new Lang.Class({
     },
 
     _showTray: function() {
-        // Don't actually take a modal grab in the overview.
-        // Just add something to the grab stack that we can
-        // pop later.
-        let modal = !this._overviewVisible;
-
         if (!this._grabHelper.grab({ actor: this.actor,
-                                     modal: modal,
+                                     modal: true,
                                      onUngrab: Lang.bind(this, this._escapeTray) })) {
             this._traySummoned = false;
             return false;
@@ -2380,8 +2371,7 @@ const MessageTray = new Lang.Class({
                       transition: 'easeOutQuad'
                     });
 
-        if (!this._overviewVisible)
-            this._lightbox.show();
+        this._lightbox.show();
 
         return true;
     },
@@ -2404,8 +2394,10 @@ const MessageTray = new Lang.Class({
 
         if (this._desktopClone)
             this._desktopClone.destroy();
-        this._desktopClone = new Clutter.Clone({ source: global.window_group, clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
-        Main.uiGroup.insert_child_above(this._desktopClone, global.window_group);
+        let cloneSource = this._overviewVisible ? global.overlay_group : global.window_group;
+        this._desktopClone = new Clutter.Clone({ source: cloneSource,
+                                                 clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
+        Main.uiGroup.insert_child_above(this._desktopClone, cloneSource);
         this._desktopClone.x = 0;
         this._desktopClone.y = 0;
         this._desktopClone.show();
@@ -2426,9 +2418,7 @@ const MessageTray = new Lang.Class({
         this._tween(this.actor, '_trayState', State.HIDDEN,
                     { y: 0,
                       time: ANIMATION_TIME,
-                      transition: 'easeOutQuad',
-                      onComplete: this._onTrayHidden,
-                      onCompleteScope: this
+                      transition: 'easeOutQuad'
                     });
 
         // Note that we might have entered here without a grab,
@@ -2438,11 +2428,6 @@ const MessageTray = new Lang.Class({
         this._lightbox.hide();
     },
 
-    _onTrayHidden: function() {
-        if (!this._overviewVisible)
-            this.actor.remove_style_pseudo_class('overview');
-    },
-
     _hideDesktopClone: function() {
         this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
                     { y: 0,